package test;

import com.ch03.service.UserService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @ClassName Main
 * @Description TODO
 * @Author Kx
 * @Date 2025/4/28 11:13
 * @Version 1.0
 */
public class Main {
    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("bean.xml");
        // 获取对象
        UserService userService = context.getBean("u1", UserService.class);

        userService.add();
    }
}
